﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace SceneControl
{
    public abstract class GameObject
    {
        public Texture2D imagem { get; set; }
        public Vector2 posicao { get; set; }
        public Rectangle rect { get; set; }
        
        public GameObject(Vector2 posicao, Texture2D imagem)
        {
            this.imagem = imagem;
            this.posicao = posicao;
        }

        public virtual void Update(GameTime gameTime)
        {
            this.rect = new Rectangle((int)this.posicao.X, (int)this.posicao.Y, this.imagem.Width, this.imagem.Height);
        }

        public virtual void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(this.imagem, this.posicao, Color.White);
        }
    }
}
